import configparser
import re
import chromadb

def chromadbSearch():
    # 连接到 ChromaDB
    chroma = chromadb.HttpClient(host="localhost", port=8000) 
    # 获取集合
    collection = chroma.get_or_create_collection(name="ragdb")

    # 获取所有 ID
    results = collection.get(include=["ids"])

    # 打印所有 ID
    print("IDs in collection:", results["ids"])

if __name__ == "__main__":
    # 连接到 ChromaDB
    chroma = chromadb.HttpClient(host="localhost", port=8000) 
    # 获取集合
    collection = chroma.get_or_create_collection(name="ragdb")

    # 获取所有 ID
    results = collection.get()

    # 打印所有 ID
    print("IDs in collection:", collection.count())